package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.po.Gate;
import com.zhijian.warehouse.manage.entity.vo.request.GateSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.GateVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface GateMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Gate record);

    int insertSelective(Gate record);

    Gate selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Gate record);

    int updateByPrimaryKey(Gate record);

    /**
     * 查询总数
     *
     * @param gateSearchVo
     * @return
     */
    int count(GateSearchVo gateSearchVo);

    /**
     * 查询列表
     *
     * @param gateSearchVo
     * @return
     */
    List<GateVo> selectList(GateSearchVo gateSearchVo);

    /**
     * 查询单个
     *
     * @param gateSearchVo
     * @return
     */
    GateVo selectOne(GateSearchVo gateSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    GateVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param gateSearchVo
     * @return
     */
    void deleteByCondition(GateSearchVo gateSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<Gate> entities);

    /**
     * 根据CreateUserId查询列表
     *
     * @param createUserId
     * @return
     */
    List<GateVo> selectListByCreateUserId(Long createUserId);

    /**
     * 根据UpdateUserId查询列表
     *
     * @param updateUserId
     * @return
     */
    List<GateVo> selectListByUpdateUserId(Long updateUserId);
}